package com.wnx.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;
import com.wnx.db.SchoolDao;
import com.wnx.entity.Menu;
import com.wnx.entity.School;
import com.wnx.service.SaleService;

public class ReturnRegAction extends ActionSupport{
	private School school;

	public School getSchool() {
		return school;
	}

	public void setSchool(School school) {
		this.school = school;
	}
	public String execute() throws Exception{
		SchoolDao sd = new SchoolDao();
		List<School> school = sd.getAllSchool();
		HttpServletRequest request = ServletActionContext.getRequest();
		HttpSession session = request.getSession();
		session.setAttribute("school", school);
		return SUCCESS;
	}
}
